# Contributor: Andy Hawkins <andy@gently.org.uk>
# Maintainer: Andy Hawkins <andy@gently.org.uk>
pkgname=py3-makefun
pkgver=1.15.6
pkgrel=0
pkgdesc="Small library to dynamically create python functions"
url="https://github.com/smarie/python-makefun"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
makedepends="
	py3-gpep517
	py3-setuptools<72
	py3-setuptools_scm
	py3-wheel
	"
checkdepends="
	py3-pytest
	py3-pytest-runner
	"
subpackages="$pkgname-pyc"
source="https://pypi.python.org/packages/source/m/makefun/makefun-$pkgver.tar.gz"
builddir="$srcdir/makefun-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	PYTHONPATH="$PWD/src" pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/makefun-$pkgver*-py2.py3-none-any.whl
}

sha512sums="
b495d28d838989cd67a219be1d4b8f3a1b5a03aeceb76c6445074d154b1b7c65a9bbc9ae8a3ee0aa6e991a9572f43ba93ed949bfccb97dc557250e4b735f0c2a  makefun-1.15.6.tar.gz
"
